using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using FluorineFx;
using FluorineFx.AMF3;
using PMG.data.Tool;

namespace PMG.data.Service
{
    [RemotingService]
    [Serializable]
    public class StatService
    {
        [DataTableType("Flex")]
        public DataTable getStat(int qid)
        {
            string strSql = "select label,dbo.fGetAnswerCount(questionid,[ID]) as data from Options where  questionid = " + qid;
            DataSet ds = SqlHelper.GetDatasetSql(strSql);

            if (ds != null)
            {
                return (DataTable)ds.Tables[0];
            }
            else
            {
                return null;
            }
        }
    }
}
